package DBase;

/**
 * 
 * @author Elya & Dana
 */
public class Coordinate {
	
    private int row;
    private int column;
    
    /**
     * Coordinate empty Constructor
     */
    public Coordinate() {
        row = 0;
	column = 0;
    }
	
    /**
     * Coordinate Constructor with 2 parameters
     * @param row
     * @param column
     */
    public Coordinate(int row, int column) {
       
        this.row = row;
        this.column = column;
    }
 
    /**
     * Gets the column number
     * @return column
     */
    public int getColumn() {
     
        return column;
    }	
    
    /**
     * Sets a column number
     * @param column
     */
    public void setColumn(int column) {
    
        this.column = column;
    }
	
    /**
     * Gets the row number
     * @return row
     */
    public int getRow() {
        return row;
    }

    /**
     * Sets a row number
     * @param row
     */
    public void setRow(int row) {
        this.row = row;
    }
	
    /**
     * Compare if current coordinate equals to given coordinate
     * @param coordinate the coordinate to compare to
     * @return boolean-true if rows and columns are equal in both coordinates
     */
    public boolean equals(Coordinate coordinate){
        return ((this.row == coordinate.getRow()) && (this.column == coordinate.getColumn()));
    }    
}

